package com.ljyhhh.SmartCity.base.database

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper

class DBHelper(context: Context) : SQLiteOpenHelper(context,"users",null,1) {

    val sqlCreate = "create table users(username text primary key,password text)"
    override fun onCreate(p0: SQLiteDatabase?) {
        //创建表格，传入建表sql语句
        p0?.execSQL(sqlCreate)
    }

    override fun onUpgrade(p0: SQLiteDatabase?, p1: Int, p2: Int) {
        //进行数据库的更新
    }

}
